package com.fishery.order.service.client;

import com.fishery.entity.Result;
import com.fishery.order.entity.Order;
import com.fishery.order.entity.client.RefrigeratoryPrepareEnter;
import com.fishery.order.entity.vo.OrderVo;
import com.fishery.order.handler.RefrigeratoryClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;


@Component
@FeignClient(value = "fishery-refrigeratory-service", fallback = RefrigeratoryClientFallback.class)
public interface RefrigeratoryClient {

	@PostMapping("/refrigeratoryOutInfo/in")
	public Result saveRefrigeratoryOutInfo(@RequestBody Order order);

	@DeleteMapping("/refrigeratoryOutInfo/in/{id}")
	public Result deleteRefrigeratoryOutInfoById(@PathVariable(value = "id", required = true) String id);

	@PostMapping("/refrigeratoryOutInfo/updateOrder")
	public Result updateOrder(@RequestBody OrderVo orderVo);

	@GetMapping("/refrigeratoryOutInfo/getProduct/{id}")
	public Result getProduct(@PathVariable(value = "id", required = true) String id);

	@GetMapping("/refrigeratoryOutInfo/selectProductInfo/{id}")
	public Result selectProductInfo(@PathVariable(value = "id") String productId);

	@PostMapping("/refrigeratoryEnter/in")
	public Result saveRefrigeratoryEnter(@RequestBody RefrigeratoryPrepareEnter refrigeratoryEnter);
}